<?php
//select: hanh vi mac dinh
// SELECT COMMAND
// get data and store in a json array
include ($_SERVER["DOCUMENT_ROOT"]."/CTAN/models/NhomNhac.php");
$manhom=$_REQUEST['manhom'];
//$manhom=1;
$nhomnhac = new NhomNhac();
$nhomnhac->setMaNhom($manhom);
$result = $nhomnhac->danhSachThanhVien();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $danhsachthanhvien[] = array(
        'ma_nghe_si' => $row['ma_nghe_si'],
        'nghe_danh' => $row['nghe_danh'],
        'ngay_gia_nhap' => $row['ngay_gia_nhap'],
        'ngay_roi_nhom' => $row['ngay_roi_nhom']
     );
}
$nhomnhac->closeConnection();
echo json_encode($danhsachthanhvien, JSON_UNESCAPED_UNICODE);
?>
